﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace MyUi_WPF_ControlDdemo
{
    /// <summary>
    /// MainWindow.xaml 的交互逻辑
    /// </summary>
    public partial class MainWindow : Window, INotifyPropertyChanged
    {
        private string _exteriorTime = "";

        public string ExteriorTime
        {
            get { return _exteriorTime; }
            set {  _exteriorTime=value; OnPropertyChanged("ExteriorTime"); }
        }

        private bool _IsRestDefaultTime = false;

        public bool IsRestDefaultTime
        {
            get { return _IsRestDefaultTime; }
            set {  _IsRestDefaultTime= value; OnPropertyChanged("IsRestDefaultTime"); }
        }

        public MainWindow()
        {
            InitializeComponent();
            this.DataContext = this;
            this.ExteriorTime = "2024-04-03 14:42:55~2024-04-03 14:42:57";
            IsRestDefaultTime = false;
            IsRestDefaultTime = true;
          
        }

        public event PropertyChangedEventHandler PropertyChanged;

        protected void OnPropertyChanged(string propertyName)
        {
            if (PropertyChanged != null)
            {
                PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
            }
        }

        private void Button_Click(object sender, RoutedEventArgs e)
        {
            //Console.WriteLine(test_Color.SelectColorHex);
            this.ExteriorTime = "2024-04-02 14:42:55~2024-04-02 14:42:57";
        }

        private void Button_Click_1(object sender, RoutedEventArgs e)
        {
            Console.WriteLine(ExteriorTime);
        }

        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            //this.test_Color.SelectColorHex = "#DE16DE";
        }
    }
}
